<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>弓友之家</title>
    <link rel="stylesheet" href="css/mui.css" />
    <link rel="stylesheet" href="fonts/iconfont.css" /> 
    <link rel="stylesheet" href="css/style.css" />
    <style>
    	.game-rank{margin-top: 10px;}
    </style>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">年度详情</h1>
		<a class="mui-icon mui-icon-more-filled mui-pull-right shareBtn"></a>
	</header>
	<div class="mui-content">
		<div class="new-game-rank">
		</div>
	</div>
	<!--分享-->
	<div class="shareWx mui-hidden"> 
		<ul class="mui-list-unstyled">
			<li class="tel"><a href="javascript:void(0)" onclick="shareWeixinMessage(1)">微信好友</a></li>
			<li class="qq"><a href="javascript:void(0)" onclick="shareWeixinMessage(2)">朋友圈</a></li>
		</ul>
		<button type="button" class="cancleShare">取消</button>
	</div>
	<script type="text/javascript" src="js/mui.min.js" ></script>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
	<script type="text/javascript" src="js/common.js" ></script>
	<script type="text/javascript" src="js/mui.zoom.js" ></script>
	<script type="text/javascript" src="js/mui.previewimage.js" ></script>
	<script type="text/javascript" charset="utf-8">
      	mui.init();
      	mui.plusReady(function(){
      		var _self=plus.webview.currentWebview();
      		var nid=_self.nid;
      		mui.ajax(H_SRC+'/amier/index/team_review_by_year',{
				data:{
					token:token,
					year_id:2
				},
				dataType:'json',
				type:'post',
				timeout:10000,             
				success:function(data){
					var dataurl=data.data;
					if(data.code == 1){
	      				//冠亚军排行
	      				var rank="";
	      				for(var i=0;i<dataurl.paiming.length;i++){
	      					rank+='<div class="new-rank">';
	      					if(dataurl.paiming[i].ranking==1){
	      						rank+='<h3>团体赛冠军</h3>';
	      					}else if(dataurl.paiming[i].ranking==2){
	      						rank+='<h3>团体赛亚军</h3>';
	      					}else if(dataurl.paiming[i].ranking==3){
	      						rank+='<h3>团体赛季军</h3>';
	      					}else{
	      						rank+='<h3>第'+(i+1)+'名</h3>';
	      					}
							rank+='<h4>'+dataurl.paiming[i].name+'</h4><a href="javascript:void(0)" data-id="'+dataurl.paiming[i].team_id+'">查看详情</a><div class="mui-row">';
							rank+='<div class="mui-col-xs-3"><div class="con"><div class="img" style="background:url('+H_SRC+''+dataurl.paiming[i].img1+') no-repeat center;background-size:cover;"><img src="'+H_SRC+''+dataurl.paiming[i].img1+'" data-preview-src="" data-preview-group="'+dataurl.paiming[i].team_id+'"/></div><p class="name">'+dataurl.paiming[i].name1+'</p></div></div>';
							rank+='<div class="mui-col-xs-3"><div class="con"><div class="img" style="background:url('+H_SRC+''+dataurl.paiming[i].img2+') no-repeat center;background-size:cover;"><img src="'+H_SRC+''+dataurl.paiming[i].img2+'" data-preview-src="" data-preview-group="'+dataurl.paiming[i].team_id+'"/></div><p class="name">'+dataurl.paiming[i].name2+'</p></div></div>';
							rank+='<div class="mui-col-xs-3"><div class="con"><div class="img" style="background:url('+H_SRC+''+dataurl.paiming[i].img3+') no-repeat center;background-size:cover;"><img src="'+H_SRC+''+dataurl.paiming[i].img3+'" data-preview-src="" data-preview-group="'+dataurl.paiming[i].team_id+'"/></div><p class="name">'+dataurl.paiming[i].name3+'</p></div></div>';
							rank+='<div class="mui-col-xs-3"><div class="con"><div class="img" style="background:url('+H_SRC+''+dataurl.paiming[i].img4+') no-repeat center;background-size:cover;"><img src="'+H_SRC+''+dataurl.paiming[i].img4+'" data-preview-src="" data-preview-group="'+dataurl.paiming[i].team_id+'"/></div><p class="name">'+dataurl.paiming[i].name4+'</p></div></div>';
							rank+='</div></div></div>';
	      				}
	      				$(".new-game-rank").append(rank);
	      				mui.previewImage();
	      				$(".new-game-rank").on("tap","a",function(){
							mid=$(this).attr("data-id");
							mui.openWindow({
								url:'integralrank-page02.html',
								id:'integralrank-page02.html',
								createNew:true,
								show: {
									autoShow: true,
									aniShow: 'slide-in-right',
									duration: 200,
								},
								extras:{
									mid:mid
								}
							});
						})
	      				
					}else{
						mui.toast(data.msg);
					}
				},
				error:function(){
					
				}
			}) 
      	})
    </script>
</body>
</html>